<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //接受的用户输入 会作为prompt的返回值
    //如果用户取消 会返回null
    var pl = window.prompt("请输入用户姓名：","文本框的默认值");
    console.log(pl);


    if(pl){
        console.log("沙比");
    }else{
        console.log("0000");
    }
</script>
</html>